package com.st.po;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

@Data
@Tag(name = "学生",description = "根据名字查询")
public class StudentNameListPo {
    /**
     * 学生姓名
     */
    @Schema(description="学生姓名")
    @Length(max = 4,message = "学生姓名格式不符合规范")
    @NotNull(message = "不能为空")
    @NotBlank(message = "不能为空格")
    private String name;

    /**
     * 年龄
     */
    @TableField(value = "age")
    @Schema(description="年龄")
    @Min(value = 1,message = "输入的数不符合常理要大于0")
    @Max(value = 150,message = "输入的数不符合常理要小于150")
    @NotNull(message = "不能为空")
    private Integer age;
}
